package com.example.demo;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
@RestController
@ResponseBody
public class returnJosn {
    @RequestMapping("/returnjosn")

    public HashMap<String,Integer> josn(){
        HashMap<String,Integer> map=new HashMap<>();
        map.put("张三",18);
        map.put("李四",16);
        map.put("王五",20);
        return map;
    }
}
